<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)"><!--head是这段名称（自己命名）,title是传递的参数-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
    <link rel="stylesheet" href="../static/css/mycss.css" th:href="@{/css/mycss.css}">
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <link rel="stylesheet" href="../static/lib/Prism/prism.css" th:href="@{/lib/Prism/prism.css}">
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <title th:replace="${title}">博客详情</title><!--//replace可以用传递过来的参数替换掉title元素里面的东西，实现每个页面的title一致-->
</head>
<body>

<nav th:fragment="menu(n)" class="ui inverted attached segment my-padding-small"><!--attached会紧贴模块，没有间隔-->
    <div class="iu container">
        <div class="ui inverted secondary stackable menu"> <!--menu导航条;   stackable会让导航栏以堆积的方式适应屏幕-->
            <h2 class="ui teal header item">Blog</h2>  <!--item让这部分成为导航栏的条目-->
            <a href="" th:href="@{/}" class="my-item item my-mobile-hide" th:classappend="${n==1} ? 'active'"><i class="home icon"></i>首页</a>
            <a href="" th:href="@{/types/-1}" class="my-item item my-mobile-hide" th:classappend="${n==2} ? 'active'"><i class="idea icon"></i>分类</a>
            <a href="" th:href="@{/tags/-1}" class="my-item item my-mobile-hide" th:classappend="${n==3} ? 'active'"><i class="tags icon"></i>标签</a>
            <a href="" th:href="@{/archives}" class="my-item item my-mobile-hide" th:classappend="${n==4} ? 'active'"><i class="clone icon"></i>归档</a>
            <a href="" th:href="@{/about}" class="my-item item my-mobile-hide" th:classappend="${n==5} ? 'active'"><i class="info icon"></i>关于我</a>

            <div class="right my-item item my-mobile-hide">
                <form name="search" action="#" method="post" th:action="@{/search}">
                    <div class="ui icon inverted transparent input">
                        <input type="text" name="query" placeholder="Search..." th:value="${query}">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
                </div>
            </div>
        </div>
    </div>
    <div href="" class="ui my-menu toggle black icon button my-right-top my-mobile-show">
        <i class="sidebar icon"></i><!--三条横杠图标-->
    </div>
</nav>

<footer th:fragment="footer" class="ui inverted vertical segment my-padding-massive">
    <div class="ui container diy_dp">
        <div class="ui stackable center aligned inverted divided grid">
            <div class="three wide column">
                <img src="../static/image/微信.jpg" th:src="@{/image/微信.jpg}" class="ui rounded image centered aligned" alt="" style="width: 130px">
            </div>

          <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
             <div id="newblog-container">
                <div class="ui inverted link list" th:fragment="newblogList">
                <a href="" class="my-teal item" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" th:each="blog : ${newblogs}" th:text="${blog.title}">碧蓝航线攻略</a><br>
                </div>
             </div>
          </div>

            <div class="three wide column">
                <h4 class="ui inverted header">联系我</h4>
                <div class="ui inverted link list">
                <a href="" class="my-teal item">Email：2332322340@qq.com</a><br>
                <a href="" class="my-teal item">qq：2332322340</a><br>

                </div>
            </div>

            <div class="seven wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <p class="my-text-spaced my-text-thin my-opacity-mini">Java后端职场小白随缘更新博客，记录遇到的问题</p>
            </div>

        </div>
        <div class="ui inverted section divider"></div>
        <p class="my-text-spaced my-text-thin my-opacity-tiny">Copyright @ 2021-2022 MrWuu Designed by MrWuu</p>
    </div>

</footer>

<th:block th:fragment="script"><!--th:block只是为了把所有js包裹起来，改成div也是可以的-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
<script src="../static/lib/Prism/prism.js" th:src="@{/lib/Prism/prism.js}"></script>
<script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
<scrpit src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></scrpit>
<scrpit src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></scrpit>
<script>
    $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
</script>
</th:block>
</body>
</html>